package com.atguigu.mapper;

import com.atguigu.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: liuaojun
 * @CreateTime: 2025-02-05
 * @Description:
 * @Version: 1.0
 */
@Mapper
public interface UserMapper {
    /**
    * @Author:liuaojun
    * @Date:2025-02-05 16:43
    * @Description:新增用户
    */
    void insertUser(User user);

    /**
    * @Author:liuaojun
    * @Date:2025-02-05 16:53
    * @Description:根据Id修改用户
    */
    void updateUser(User user);

    /**
    * @Author:liuaojun
    * @Date:2025-02-05 16:56
    * @Description:根据Id删除用户
    */
    void deleteUser(Integer id);

    /**
    * @Author:liuaojun
    * @Date:2025-02-05 17:00
    * @Description:根据Id查询用户
    */
    User selectUser(Integer id);

    /**
    * @Author:liuaojun
    * @Date:2025-02-05 17:04
    * @Description:查询所有用户
    */
    List<User> selectAllUser();
}
